<?php
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.gxgyl.com All rights reserved.

// +----------------------------------------------------------------------
// | Author: Liuyu
// +----------------------------------------------------------------------
declare (strict_types = 1);

namespace app\store\model\shiyao;

use app\common\model\shiyao\PayOpenImage as PayOpenImageModel;

/**
 * 申办方模型
 * Class StoreUser
 * @package app\store\model
 */
class PayOpenImage extends PayOpenImageModel {


	/**
	 * 软删除
	 * @return false|int
	 */
	public function setDelete() {

		return $this->transaction(function () {
			// 删除对应的角色关系
			UserRole::deleteAll([['store_user_id', '=', (int) $this['store_user_id']]]);
			return $this->save(['is_delete' => 1]);
		});
	}
	public static function detail(int $PayLogId) {

		$detail = self::get(['PayLog_id' => $PayLogId]);

		return $detail;
	}

}
